package com.atos.optical.common;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class ServiceExceptionHandler {
    @ExceptionHandler(value = ServiceException.class)
    public ApiResult<Object> serviceExceptionHandler(ServiceException e) {
        return ApiResult.failed(e);
    }
}
